<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Kinetis Bootloader Host: blfwk::GHSSecInfo Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="nxp_logo_small.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Kinetis Bootloader Host
   &#160;<span id="projectnumber">2.0.0</span>
   </div>
   <div id="projectbrief">Host Tools for Kinetis devices</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Introduction</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classblfwk_1_1_g_h_s_sec_info.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="classblfwk_1_1_g_h_s_sec_info-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">blfwk::GHSSecInfo Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Wrapper around the GHS-specific .secinfo ELF section.  
 <a href="classblfwk_1_1_g_h_s_sec_info.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="src_2blfwk_2_g_h_s_sec_info_8h_source.html">GHSSecInfo.h</a>&gt;</code></p>
<div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-0-trigger" src="closed.png" alt="+"/> Collaboration diagram for blfwk::GHSSecInfo:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center"><iframe scrolling="no" frameborder="0" src="classblfwk_1_1_g_h_s_sec_info__coll__graph.svg" width="1390" height="402"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:structblfwk_1_1_g_h_s_sec_info_1_1ghs__secinfo__t"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classblfwk_1_1_g_h_s_sec_info.html#structblfwk_1_1_g_h_s_sec_info_1_1ghs__secinfo__t">ghs_secinfo_t</a></td></tr>
<tr class="memdesc:structblfwk_1_1_g_h_s_sec_info_1_1ghs__secinfo__t"><td class="mdescLeft">&#160;</td><td class="mdescRight">The structure of one .secinfo entry.  <a href="classblfwk_1_1_g_h_s_sec_info.html#structblfwk_1_1_g_h_s_sec_info_1_1ghs__secinfo__t">More...</a><br /></td></tr>
<tr class="separator:structblfwk_1_1_g_h_s_sec_info_1_1ghs__secinfo__t"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:afe8d61306169527bbdbf2a44d65f0620"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classblfwk_1_1_g_h_s_sec_info.html#afe8d61306169527bbdbf2a44d65f0620">GHSSecInfo</a> (<a class="el" href="class_st_e_l_f_file.html">StELFFile</a> *elf)</td></tr>
<tr class="memdesc:afe8d61306169527bbdbf2a44d65f0620"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor.  <a href="#afe8d61306169527bbdbf2a44d65f0620">More...</a><br /></td></tr>
<tr class="separator:afe8d61306169527bbdbf2a44d65f0620"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1db94621fa12b735f2c1483f8d34b3bb"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1db94621fa12b735f2c1483f8d34b3bb"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classblfwk_1_1_g_h_s_sec_info.html#a1db94621fa12b735f2c1483f8d34b3bb">hasSecinfo</a> () const </td></tr>
<tr class="memdesc:a1db94621fa12b735f2c1483f8d34b3bb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns true if there is a .secinfo section present in the ELF file. <br /></td></tr>
<tr class="separator:a1db94621fa12b735f2c1483f8d34b3bb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0f4383ca468639fa6612c95e8092f25d"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classblfwk_1_1_g_h_s_sec_info.html#a0f4383ca468639fa6612c95e8092f25d">isSectionFilled</a> (uint32_t addr, uint32_t length)</td></tr>
<tr class="memdesc:a0f4383ca468639fa6612c95e8092f25d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Determines if a section should be filled.  <a href="#a0f4383ca468639fa6612c95e8092f25d">More...</a><br /></td></tr>
<tr class="separator:a0f4383ca468639fa6612c95e8092f25d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9f44eaed79e01f738b7aa535006acd4a"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classblfwk_1_1_g_h_s_sec_info.html#a9f44eaed79e01f738b7aa535006acd4a">isSectionFilled</a> (const <a class="el" href="struct_elf32___shdr.html">Elf32_Shdr</a> &amp;section)</td></tr>
<tr class="memdesc:a9f44eaed79e01f738b7aa535006acd4a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Determines if <em>section</em> should be filled.  <a href="#a9f44eaed79e01f738b7aa535006acd4a">More...</a><br /></td></tr>
<tr class="separator:a9f44eaed79e01f738b7aa535006acd4a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:a071fd6be53dd9da237da67a5705e46f6"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a071fd6be53dd9da237da67a5705e46f6"></a>
<a class="el" href="class_st_e_l_f_file.html">StELFFile</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classblfwk_1_1_g_h_s_sec_info.html#a071fd6be53dd9da237da67a5705e46f6">m_elf</a></td></tr>
<tr class="memdesc:a071fd6be53dd9da237da67a5705e46f6"><td class="mdescLeft">&#160;</td><td class="mdescRight">The parser object for our ELF file. <br /></td></tr>
<tr class="separator:a071fd6be53dd9da237da67a5705e46f6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a064b188fbf94119120491c0d4f7c688b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a064b188fbf94119120491c0d4f7c688b"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classblfwk_1_1_g_h_s_sec_info.html#a064b188fbf94119120491c0d4f7c688b">m_hasInfo</a></td></tr>
<tr class="memdesc:a064b188fbf94119120491c0d4f7c688b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Whether .secinfo is present in the ELF file. <br /></td></tr>
<tr class="separator:a064b188fbf94119120491c0d4f7c688b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9c356116ffd30dbed5255398a6118a1e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9c356116ffd30dbed5255398a6118a1e"></a>
<a class="el" href="group__smart__pointer.html#classsmart__array__ptr">smart_array_ptr</a>&lt; <a class="el" href="classblfwk_1_1_g_h_s_sec_info.html#structblfwk_1_1_g_h_s_sec_info_1_1ghs__secinfo__t">ghs_secinfo_t</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classblfwk_1_1_g_h_s_sec_info.html#a9c356116ffd30dbed5255398a6118a1e">m_info</a></td></tr>
<tr class="memdesc:a9c356116ffd30dbed5255398a6118a1e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to the .secinfo entries. Will be NULL if there is no .secinfo section in the file. <br /></td></tr>
<tr class="separator:a9c356116ffd30dbed5255398a6118a1e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6257d53e563235e05b83306652e64149"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6257d53e563235e05b83306652e64149"></a>
unsigned&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classblfwk_1_1_g_h_s_sec_info.html#a6257d53e563235e05b83306652e64149">m_entryCount</a></td></tr>
<tr class="memdesc:a6257d53e563235e05b83306652e64149"><td class="mdescLeft">&#160;</td><td class="mdescRight">Number of entries in <a class="el" href="classblfwk_1_1_g_h_s_sec_info.html#a9c356116ffd30dbed5255398a6118a1e" title="Pointer to the .secinfo entries. Will be NULL if there is no .secinfo section in the file...">m_info</a>. <br /></td></tr>
<tr class="separator:a6257d53e563235e05b83306652e64149"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Wrapper around the GHS-specific .secinfo ELF section. </p>
<p>ELF files produced by the Green Hills MULTI toolset will have a special .secinfo section. For the most part, this section contains a list of address ranges that should be filled by the C runtime startup code. The address ranges correspond to those of ELF sections whose type is #SHT_NOBITS. The GHS runtime uses this table instead of just filling all #SHT_NOBITS sections because the linker command file can be used to optionally not fill individual sections.</p>
<p>The <a class="el" href="classblfwk_1_1_g_h_s_sec_info.html#a0f4383ca468639fa6612c95e8092f25d" title="Determines if a section should be filled. ">isSectionFilled()</a> methods let calling code determine if an ELF section is found in the .secinfo table. If the section is found, then it should be filled. </p>
</div><hr/><h2 class="groupheader">Class Documentation</h2>
<a name="structblfwk_1_1_g_h_s_sec_info_1_1ghs__secinfo__t" id="structblfwk_1_1_g_h_s_sec_info_1_1ghs__secinfo__t"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct blfwk::GHSSecInfo::ghs_secinfo_t</td>
        </tr>
      </table>
</div><div class="memdoc">
<div class="textblock"><p>The structure of one .secinfo entry. </p>
</div><table class="fieldtable">
<tr><th colspan="3">Class Members</th></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a23912b52f09e5df385339db5d7176c7c"></a>uint32_t</td>
<td class="fieldname">
m_clearAddr</td>
<td class="fielddoc">
Address to start filling from. </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a226f90a0047a90cd9847aca70caec770"></a>uint32_t</td>
<td class="fieldname">
m_clearValue</td>
<td class="fielddoc">
<a class="el" href="classblfwk_1_1_value.html" title="Abstract base class for values of arbitrary types. ">Value</a> to fill with. </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a76685262acac461c733d71a5e693bc52"></a>uint32_t</td>
<td class="fieldname">
m_numBytesToClear</td>
<td class="fielddoc">
Number of bytes to fill. </td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="afe8d61306169527bbdbf2a44d65f0620"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">GHSSecInfo::GHSSecInfo </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_st_e_l_f_file.html">StELFFile</a> *&#160;</td>
          <td class="paramname"><em>elf</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Default constructor. </p>
<p>The ELF file passed into this constructor as the <em>elf</em> argument must remain valid for the life of this object.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">elf</td><td>The ELF file parser. An assertion is raised if this is NULL. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a0f4383ca468639fa6612c95e8092f25d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool GHSSecInfo::isSectionFilled </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>addr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>length</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Determines if a section should be filled. </p>
<p>Looks up <em>addr</em> for <em>length</em> in the .secinfo array. Only if that address is in the .secinfo array does this section need to be filled. If the section is found but the length does not match the <em>length</em> argument, a message is logged at the <a class="el" href="group__logging.html#a5209ca5ee1a2a8181287485e950cf381a8e3ed7030f92b6542e5354e937f2e0ee" title="For non-fatal warning messages. ">Logger::kWarning</a> level.</p>
<p>If the .secinfo section is not present in the ELF file, this method always returns true.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">addr</td><td>The start address of the section to query. </td></tr>
    <tr><td class="paramname">length</td><td>The length of the section. If a section with a start address matching <em>addr</em> is found, its length must match <em>length</em> to be considered.</td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">true</td><td>The section matching <em>addr</em> and <em>length</em> was found and should be filled. True is also returned when the ELF file does not have a .secinfo section. </td></tr>
    <tr><td class="paramname">false</td><td>The section was not found and should not be filled. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a9f44eaed79e01f738b7aa535006acd4a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool GHSSecInfo::isSectionFilled </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="struct_elf32___shdr.html">Elf32_Shdr</a> &amp;&#160;</td>
          <td class="paramname"><em>section</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Determines if <em>section</em> should be filled. </p>
<p>Simply calls through to <a class="el" href="classblfwk_1_1_g_h_s_sec_info.html#a0f4383ca468639fa6612c95e8092f25d" title="Determines if a section should be filled. ">isSectionFilled(uint32_t, uint32_t)</a> to determine if <em>section</em> should be filled.</p>
<p>If the .secinfo section is not present in the ELF file, this method always returns true. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="src_2blfwk_2_g_h_s_sec_info_8h_source.html">src/blfwk/GHSSecInfo.h</a></li>
<li>src/blfwk/src/GHSSecInfo.cpp</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><b>blfwk</b></li><li class="navelem"><a class="el" href="classblfwk_1_1_g_h_s_sec_info.html">GHSSecInfo</a></li>
    <li class="footer">Generated on Mon Mar 7 2016 16:49:51 for Kinetis Bootloader Host by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
